'use strict';

module.exports = app => {
  const { STRING, INTEGER, TEXT } = app.Sequelize;

  const Setting = app.model.define('setting', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true, unique: true },
    key: { type: STRING, unique: true },
    value: {
      type: TEXT,
      defaultValue: '',
    },
  }, {
    timestamps: false,
    tableName: 'l_setting',
  })

  return Setting;
}
